package main

import (
	"fmt"
	"io/ioutil"
	"path/filepath"
)

func main() {
	fmt.Println("加油")
	dirTest()
}

func dirTest() {
	//自己电脑里c盘下面watcher文件夹：
	userPath := "C:\\watcher"
	
	fs, _ := ioutil.ReadDir(userPath)
	existSave := ""
	for _, v := range fs {
		fmt.Println("v.Name:为", v.Name())
		if !v.IsDir() {
			//fmt.Println("v.Name:为", v.Name())
			existSave = filepath.Join(userPath, v.Name())
			
			//fmt.Println("v.Name:为", v)
		}
	}
	fmt.Println("existSave为:", existSave)
}
